<template>
  <div id="app">
    <!-- <RouterDemo></RouterDemo> -->
    <div class="footer_wrap">
      <span @click="btn('/find', 'Find')">发现音乐</span> &nbsp;
      <span @click="btn('/my', 'My')">我的音乐</span> &nbsp;
      <span @click="btn('/part', 'Part')">朋友</span>&nbsp;

      <!-- <span @click="oneBtn">朋友-小传</span> &nbsp;
      <span @click="twoBtn">朋友-小智</span> -->
    </div>
    <div class="top">
      <router-view></router-view>
    </div>
  </div>
</template>

<script>

import RouterDemo from "./components/RouterDemo.vue";

export default {
  name: "app",
  components: {
    RouterDemo
  },
  methods: {
    btn(path, name) {
      this.$router.push({
        path: path,
        name: name
      });
    },
    oneBtn() {
      this.$router.push({
        name: 'Part',
        params:{
          username: '小传'
        }
      });
    },
    twoBtn() {
      this.$router.push({
        name: 'Part',
        query:{
          name: '小智'
        }
      });
    }
  }
};

</script>

<style>

</style>
